1. Field
The embodiments discussed herein are directed to an image recognition device which processes an image using computing hardware and/or software, and more specifically an image recognition device which rotates an input image at real time, including methods and computer readable media thereof.
2. Description of the Related Art
Most of image processes used for image recognition are currently executed by software, but some of functions are being implemented in computing hardware. This is because high-speed image process by parallel processing which is an advantage of hardware is required.
For example, Japanese Patent Application Laid-Open Nos. 11-252353, 6-333032, 2006-13803 and 10-222655 disclose a device in which some or all of functions are implemented in hardware and an image process such as rotation is executed on original images.
FIG. 1 is a diagram illustrating a method for the rotation process in a conventional image process. FIG. 1 illustrates an output rotation image 1 and an original image 2. In FIG. 1, the rotating process is executed in such a manner that a coordinate is calculated as to which coordinate on the original image 2 corresponds to each pixel of the output rotation image 1, and the coordinate data is referred to. When points to be a reference of the output image 1 are shown on the original image 2, a tilted rectangle 3 is displayed.
Details of the processing flow is as follows.
(100) Data about the original image 2 for one frame is stored in a memory.
(102) A rotting angle of the rotation image 1 to be output is determined before the process starts.
(103) The coordinates of pixels to be referred to are calculated as to which pixel of the original image 2 correspond to each pixel of the output rotation image 1.
The coordinates of the original image 2 to be referred to are obtained by the following calculating formula.x=X cos θ+Y sin θy=−X sin θ+Y cos θ
θ: rotating angle, (x,y): the coordinate of the original image 2, (X,Y): the coordinate of the output image 1
(104) The pixel data of the coordinates to be referred to from the original image 2 are read from the memory. When pixels on which the calculated coordinates correspond to an intermediate value are not present, values of the pixels should be created by interpolation. For this reason, values of peripheral pixels are read.
(105) The data about the output rotation image 1 is output. A portion which requires interpolation is subject to the interpolation so as to be output.
(106) The processes (103) to (105) are successively executed on all the pixels of the output rotation image 1 so that data is created.
FIG. 2 illustrates the processing sequence of the output rotation image 1 in (106). As shown in FIG. 2, corresponding pixels on the original image 2 are obtained successively in an x right direction starting from a pixel on an upper left position of the output rotation image 1, and data about the output rotation image 1 is obtained from the data about the corresponding pixels.
In FIG. 2, the output rotation image 1 is obtained by rotating the original image 2 reversely through θ°. Therefore, when the corresponding pixels are obtained as shown in FIG. 2, the corresponding pixels are generated to an upper right direction (x+, y+) successively from a process start point of the original image 2.
A time chart of the processes (100) to (106) is shown in FIG. 3. In FIG. 3, when the original image 2 is input, it is stored in the memory ((100)). When the storage is completed, the rotating angle is determined before the image process starts ((102)), and a corresponding coordinate is calculated on the original image 2 based on the rotating angle ((103)). The corresponding coordinate data of the original image 2 is read from the calculated result ((104)), and this data is output as the data about the output rotation image 1 ((105)).
After the input of the original image 2 into the memory is completed, the processes (103) to (105) are executed successively on all the pixels of the output rotation image 1 (106).
When these image processes are executed by software, since the calculation is carried out on all the pixels of the output rotation image 1, a calculating amount is large, and an immense amount of time is required in a software process.
Therefore, when the processes are performed in hardware in order to increase the speed of the processes, it is necessary to once store the original image 2 for one frame, and thus a large memory is required. Further, since complicated calculating processes such as trigonometrical function and division process are included, a circuit size for the calculating process becomes huge.